package com.ones.mqtt.nano.model;

import com.ones.mqtt.nano.constant.OnesNanoMqConsts;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;

/**
 * NanoMq发布消息应答Dto
 * @author Clark
 * @version 2024-11-21
 */
@Getter
@Setter
@ToString
public class OnesNanoMqPublishRes implements Serializable {
    /**
     * 返回码
     */
    private int code;
    /**
     * 描述
     */
    private String description;

    /**
     *
     * @return
     */
    public boolean isOk() {
        return this.code == OnesNanoMqConsts.NanoMqResultCodeConsts.CODE_0;
    }
}
